<?php

//echo br(3); ###########################################################################################

	$TEMP->set_file(array('handle' => DIR_VIEW_DEAN . 'semesterFees.html'));
	
	$CID 	= _GET('cid');
	
	$semesterLinker = $DSC->getSemesterLinker($CID);

	if ( !empty($semesterLinker) ) {
		$TEMP->set_block('handle',  'semester', 'semesterRow');
		$numCount 	= 1;
		foreach($semesterLinker as $semesterLinkerField => $semesterLinkerValue) {
			$semDesc 	 = $semesterLinkerValue['sem_desc'];
			$semLinkerID = $semesterLinkerValue['sem_linker_idPK'];
			$TEMP->set_var(array('sem_desc' 					=> '<div class="subj-year-semester-value">' . $semDesc . '</div>',
								 'add_subject_button_section'	=> '<a href="?page=CourseSections&slid=' . $semLinkerID . '&hash=' . hashRandom($dept_course.$course_desc.$based.$year) . '"><img src="' . DIR_IMAGES . 'icon/section.png" border="0" title="' . $semDesc . '"/></a>',
								 'add_subject_button_fees'		=> '<a href="?page=FeesAmount&slid=' . $semLinkerID . '&hash=' . hashRandom($dept_course.$course_desc.$based.$year) . '"><img src="' . DIR_IMAGES . 'icon/tuition_fees.png" border="0" title="' . $semDesc . '"/></a>',
								 'numbering'					=> $numCount,
								 'sem_linker_id' 				=> $semLinkerID,
								 'sem_note'						=> $semNote,
								 'subject_listing' 				=> $subjectListing));
			$TEMP->parse('semesterRow', 'semester', true);
			$numCount++;
		}
	}
	else {
		$TEMP->set_var(array('sem_desc' 					=> 'No Record Found.',
							 'add_subject_button_section'	=> '',
							 'add_subject_button_fees'		=> '',
							 'numbering'					=> '',
							 'sem_linker_id' 				=> '',
							 'sem_note'						=> '',
							 'subject_listing' 				=> ''));
	}
	
	##################### CHECKLIST HEADER #####################
	
		$courseHeader = $DSC->getCourseHeader($strAccDept);
		$getCourse 	  = $DSC->getCourse($CID);
	
		#SET Course
		if(!empty($getCourse)) {
			$course_label	= $getCourse['course_desc'] . ' (' . $getCourse['course_code'] . ')';
			$course_title	= $course_label;
		}
		else {
			$course_label	= '______________________________________________';
			$course_title	= '&nbsp;';
		}
		
		#SET Checklist Header
		if(!empty($getCourse)) {
			$based 		 	= $courseHeader['head_based'];
			$year 		 	= $courseHeader['head_year'];
		}
		else {
			$based 		 	= '__________________________________';
			$year 		 	= '_______________';
		}
	
	##################### CHECKLIST HEADER #####################
	
	$TEMP->set_var(array('search' 			=> $search,
						 'dean_sub_menu'	=> $pageLib->deanSubMenu(DIR_IMAGES),
						 'dept_course'		=> $strAccCourse,
						 'course_desc'		=> $course_label,
						 'course_title'		=> $course_title,
						 'course_id'		=> $CID,
						 'based'			=> $based,
						 'year'				=> $year
						));
?>